package com.example.springboot.listener;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * SpringApplicationRunListener其需要在META-INF中配置spring.factories
 * # Initializers
 * org.springframework.context.ApplicationContextInitializer=\
 * com.example.springboot.listener.MyApplicationContextInitializer
 *
 * @Author:ChenZhangKun
 * @Date: 2020/10/14 21:26
 */
public class MyApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        System.out.println("ApplicationContextInitializer.....运行了");
    }
}
